home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIPluginManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  13KB  |  296 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPluginManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPluginManager_h__
  6. #define __gen_nsIPluginManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nspluginroot_h__
  14. #include "nspluginroot.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. #include "nsplugindefs.h"
  22. #define NS_PLUGINMANAGER_CID                         \
  23. { /* ce768990-5a4e-11d2-8164-006008119d7a */         \
  24.     0xce768990,                                      \
  25.     0x5a4e,                                          \
  26.     0x11d2,                                          \
  27.     {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
  28. }
  29. class nsIPluginStreamListener; /* forward declaration */
  30.  
  31.  
  32. /* starting interface:    nsIPluginManager */
  33. #define NS_IPLUGINMANAGER_IID_STR "da58ad80-4eb6-11d2-8164-006008119d7a"
  34.  
  35. #define NS_IPLUGINMANAGER_IID \
  36.   {0xda58ad80, 0x4eb6, 0x11d2, \
  37.     { 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
  38.  
  39. class nsIPluginManager : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER_IID)
  43.  
  44.   /**
  45.      * Returns the value of a variable associated with the plugin manager.
  46.      *
  47.      * (Corresponds to NPN_GetValue.)
  48.      *
  49.      * @param variable - the plugin manager variable to get
  50.      * @param value - the address of where to store the resulting value
  51.      * @result - NS_OK if this operation was successful
  52.      */
  53.   /* [noscript] void GetValue (in nsPluginManagerVariable variable, in nativeVoid value); */
  54.   NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) = 0;
  55.  
  56.   /**
  57.      * Causes the plugins directory to be searched again for new plugin 
  58.      * libraries.
  59.      *
  60.      * (Corresponds to NPN_ReloadPlugins.)
  61.      *
  62.      * @param reloadPages - indicates whether currently visible pages should 
  63.      * also be reloaded
  64.      */
  65.   /* void reloadPlugins (in boolean reloadPages); */
  66.   NS_IMETHOD ReloadPlugins(PRBool reloadPages) = 0;
  67.  
  68.   /**
  69.      * Returns the user agent string for the browser. 
  70.      *
  71.      * (Corresponds to NPN_UserAgent.)
  72.      *
  73.      * @param resultingAgentString - the resulting user agent string
  74.      */
  75.   /* [noscript] void UserAgent (in nativeChar resultingAgentString); */
  76.   NS_IMETHOD UserAgent(const char * * resultingAgentString) = 0;
  77.  
  78.     NS_IMETHOD
  79.     GetURL(nsISupports* pluginInst,
  80.            const char* url,
  81.            const char* target = NULL,
  82.            nsIPluginStreamListener* streamListener = NULL,
  83.            const char* altHost = NULL,
  84.            const char* referrer = NULL,
  85.            PRBool forceJSEnabled = PR_FALSE) = 0;
  86.     NS_IMETHOD
  87.     PostURL(nsISupports* pluginInst,
  88.             const char* url,
  89.             PRUint32 postDataLen,
  90.             const char* postData,
  91.             PRBool isFile = PR_FALSE,
  92.             const char* target = NULL,
  93.             nsIPluginStreamListener* streamListener = NULL,
  94.             const char* altHost = NULL,
  95.             const char* referrer = NULL,
  96.             PRBool forceJSEnabled = PR_FALSE,
  97.             PRUint32 postHeadersLength = 0,
  98.             const char* postHeaders = NULL) = 0;
  99.   /**
  100.      * Fetches a URL.
  101.      *
  102.      * (Corresponds to NPN_GetURL and NPN_GetURLNotify.)
  103.      *
  104.      * @param pluginInst - the plugin making the request. If NULL, the URL
  105.      *   is fetched in the background.
  106.      * @param url - the URL to fetch
  107.      * @param target - the target window into which to load the URL, or NULL if
  108.      *   the data should be returned to the plugin via streamListener.
  109.      * @param streamListener - a stream listener to be used to return data to
  110.      *   the plugin. May be NULL if target is not NULL.
  111.      * @param altHost - an IP-address string that will be used instead of the 
  112.      *   host specified in the URL. This is used to prevent DNS-spoofing 
  113.      *   attacks. Can be defaulted to NULL meaning use the host in the URL.
  114.      * @param referrer - the referring URL (may be NULL)
  115.      * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
  116.      *   URLs, even if the user currently has JavaScript disabled (usually 
  117.      *   specify PR_FALSE) 
  118.      * @result - NS_OK if this operation was successful
  119.      */
  120. /**
  121.      * Posts to a URL with post data and/or post headers.
  122.      *
  123.      * (Corresponds to NPN_PostURL and NPN_PostURLNotify.)
  124.      *
  125.      * @param pluginInst - the plugin making the request. If NULL, the URL
  126.      *   is fetched in the background.
  127.      * @param url - the URL to fetch
  128.      * @param postDataLength - the length of postData (if non-NULL)
  129.      * @param postData - the data to POST. NULL specifies that there is not post
  130.      *   data
  131.      * @param isFile - whether the postData specifies the name of a file to 
  132.      *   post instead of data. The file will be deleted afterwards.
  133.      * @param target - the target window into which to load the URL, or NULL if
  134.      *   the data should be returned to the plugin via streamListener.
  135.      * @param streamListener - a stream listener to be used to return data to
  136.      *   the plugin. May be NULL if target is not NULL.
  137.      * @param altHost - an IP-address string that will be used instead of the 
  138.      *   host specified in the URL. This is used to prevent DNS-spoofing 
  139.      *   attacks. Can be defaulted to NULL meaning use the host in the URL.
  140.      * @param referrer - the referring URL (may be NULL)
  141.      * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
  142.      *   URLs, even if the user currently has JavaScript disabled (usually 
  143.      *   specify PR_FALSE) 
  144.      * @param postHeadersLength - the length of postHeaders (if non-NULL)
  145.      * @param postHeaders - the headers to POST. Must be in the form of
  146.      * "HeaderName: HeaderValue\r\n".  Each header, including the last,
  147.      * must be followed by "\r\n".  NULL specifies that there are no
  148.      * post headers
  149.      * @result - NS_OK if this operation was successful
  150.      */
  151. /**
  152.      * Persistently register a plugin with the plugin
  153.      * manager. aMimeTypes, aMimeDescriptions, and aFileExtensions are
  154.      * parallel arrays that contain information about the MIME types
  155.      * that the plugin supports.
  156.      *
  157.      * @param aCID - the plugin's CID
  158.      * @param aPluginName - the plugin's name
  159.      * @param aDescription - a description of the plugin
  160.      * @param aMimeTypes - an array of MIME types that the plugin
  161.      *   is prepared to handle
  162.      * @param aMimeDescriptions - an array of descriptions for the
  163.      *   MIME types that the plugin can handle.
  164.      * @param aFileExtensions - an array of file extensions for
  165.      *   the MIME types that the plugin can handle.
  166.      * @param aCount - the number of elements in the aMimeTypes,
  167.      *   aMimeDescriptions, and aFileExtensions arrays.
  168.      * @result - NS_OK if the operation was successful.
  169.      */
  170.   /* [noscript] void RegisterPlugin (in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount); */
  171.   NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) = 0;
  172.  
  173.   /**
  174.      * Unregister a plugin from the plugin manager
  175.      *
  176.      * @param aCID the CID of the plugin to unregister.
  177.      * @result - NS_OK if the operation was successful.
  178.      */
  179.   /* [noscript] void UnregisterPlugin (in REFNSIID aCID); */
  180.   NS_IMETHOD UnregisterPlugin(REFNSIID aCID) = 0;
  181.  
  182.     /**
  183.      * Fetches a URL, with Headers
  184.      * @see GetURL.  Identical except for additional params headers and
  185.      * headersLen
  186.      * @param getHeadersLength - the length of getHeaders (if non-NULL)
  187.      * @param getHeaders - the headers to GET. Must be in the form of
  188.      * "HeaderName: HeaderValue\r\n".  Each header, including the last,
  189.      * must be followed by "\r\n".  NULL specifies that there are no
  190.      * get headers
  191.      * @result - NS_OK if this operation was successful
  192.      */
  193.     NS_IMETHOD
  194.     GetURLWithHeaders(nsISupports* pluginInst,
  195.                       const char* url,
  196.                       const char* target = NULL,
  197.                       nsIPluginStreamListener* streamListener = NULL,
  198.                       const char* altHost = NULL,
  199.                       const char* referrer = NULL,
  200.                       PRBool forceJSEnabled = PR_FALSE,
  201.                       PRUint32 getHeadersLength = 0,
  202.                       const char* getHeaders = NULL) = 0;
  203. };
  204.  
  205. /* Use this macro when declaring classes that implement this interface. */
  206. #define NS_DECL_NSIPLUGINMANAGER \
  207.   NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value); \
  208.   NS_IMETHOD ReloadPlugins(PRBool reloadPages); \
  209.   NS_IMETHOD UserAgent(const char * * resultingAgentString); \
  210.   NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount); \
  211.   NS_IMETHOD UnregisterPlugin(REFNSIID aCID); \
  212.  
  213. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  214. #define NS_FORWARD_NSIPLUGINMANAGER(_to) \
  215.   NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) { return _to GetValue(variable, value); } \
  216.   NS_IMETHOD ReloadPlugins(PRBool reloadPages) { return _to ReloadPlugins(reloadPages); } \
  217.   NS_IMETHOD UserAgent(const char * * resultingAgentString) { return _to UserAgent(resultingAgentString); } \
  218.   NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) { return _to RegisterPlugin(aCID, aPluginName, aDescription, aMimeTypes, aMimeDescriptions, aFileExtensions, aCount); } \
  219.   NS_IMETHOD UnregisterPlugin(REFNSIID aCID) { return _to UnregisterPlugin(aCID); } \
  220.  
  221. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  222. #define NS_FORWARD_SAFE_NSIPLUGINMANAGER(_to) \
  223.   NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(variable, value); } \
  224.   NS_IMETHOD ReloadPlugins(PRBool reloadPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReloadPlugins(reloadPages); } \
  225.   NS_IMETHOD UserAgent(const char * * resultingAgentString) { return !_to ? NS_ERROR_NULL_POINTER : _to->UserAgent(resultingAgentString); } \
  226.   NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterPlugin(aCID, aPluginName, aDescription, aMimeTypes, aMimeDescriptions, aFileExtensions, aCount); } \
  227.   NS_IMETHOD UnregisterPlugin(REFNSIID aCID) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterPlugin(aCID); } \
  228.  
  229. #if 0
  230. /* Use the code below as a template for the implementation class for this interface. */
  231.  
  232. /* Header file */
  233. class nsPluginManager : public nsIPluginManager
  234. {
  235. public:
  236.   NS_DECL_ISUPPORTS
  237.   NS_DECL_NSIPLUGINMANAGER
  238.  
  239.   nsPluginManager();
  240.  
  241. private:
  242.   ~nsPluginManager();
  243.  
  244. protected:
  245.   /* additional members */
  246. };
  247.  
  248. /* Implementation file */
  249. NS_IMPL_ISUPPORTS1(nsPluginManager, nsIPluginManager)
  250.  
  251. nsPluginManager::nsPluginManager()
  252. {
  253.   /* member initializers and constructor code */
  254. }
  255.  
  256. nsPluginManager::~nsPluginManager()
  257. {
  258.   /* destructor code */
  259. }
  260.  
  261. /* [noscript] void GetValue (in nsPluginManagerVariable variable, in nativeVoid value); */
  262. NS_IMETHODIMP nsPluginManager::GetValue(nsPluginManagerVariable variable, void * value)
  263. {
  264.     return NS_ERROR_NOT_IMPLEMENTED;
  265. }
  266.  
  267. /* void reloadPlugins (in boolean reloadPages); */
  268. NS_IMETHODIMP nsPluginManager::ReloadPlugins(PRBool reloadPages)
  269. {
  270.     return NS_ERROR_NOT_IMPLEMENTED;
  271. }
  272.  
  273. /* [noscript] void UserAgent (in nativeChar resultingAgentString); */
  274. NS_IMETHODIMP nsPluginManager::UserAgent(const char * * resultingAgentString)
  275. {
  276.     return NS_ERROR_NOT_IMPLEMENTED;
  277. }
  278.  
  279. /* [noscript] void RegisterPlugin (in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount); */
  280. NS_IMETHODIMP nsPluginManager::RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount)
  281. {
  282.     return NS_ERROR_NOT_IMPLEMENTED;
  283. }
  284.  
  285. /* [noscript] void UnregisterPlugin (in REFNSIID aCID); */
  286. NS_IMETHODIMP nsPluginManager::UnregisterPlugin(REFNSIID aCID)
  287. {
  288.     return NS_ERROR_NOT_IMPLEMENTED;
  289. }
  290.  
  291. /* End of implementation class template. */
  292. #endif
  293.  
  294.  
  295. #endif /* __gen_nsIPluginManager_h__ */
  296.